-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysql 8.0 support #7
base: master
Are you sure you want to change the base?
Conversation
parthasai
commented
Jun 21, 2023
- Instead of using the unsupported my_bool variable in MySQL 8, have replaced it with int.
- In the install.sh and uninstall.sh scripts, modified the mechanism for extracting the plugin_dir. Previously, it was outputting 'plugin_dir ', which caused issues in the subsequent steps. Now, the extraction correctly provides only plugin directory path.
- Updated readme file to include installation of libmysqlclient-dev golang-go packages
Hello, I installed this patch/branch from parthasai on MariaDB Database client version: libmysql - mysqlnd 8.2.8 and all works great. The unpatched version did not work. As you probably know, MySQL does not allow data returns in insert triggers. I can call a procedure holding the http function from a trigger, but the http function still returns values, that in turn are automatically passed back to the calling insert trigger, thereby causing the trigger to fail. I was hoping you could add an option flag to the http functions that would disable any returns. This might do the trick to using these functions in a trigger. |
There is another possibility that causes an insert trigger to fail. It may be that the mySQL engine sees the "SELECT http_get()" in the called procedure as a true SELECT statement that would by definition, return some type of value, and thereby cause the insert trigger to fail. I imagine this could only be solved by doing something like using "CALL http_get()" Is there any way to restructure the way the http_get function is used/initiated? |
I also had to change the http.go file header to: /* This seemed to do the trick to get it to compile. |
One final comment. I was able to get this to work using the following statement: INSERT INTO logtable SET log= http_get(TRIM(@my_URL2)), msg1=@my_message, msg2=@my_params; I basically created a logtable, and then directed the return of the http_get() function into the "log" field, with msg1 and msg2 fields capturing passed parameters from the originating trigger. You should note on your info page that you can use the INSERT command to make the function work in a trigger. Thanks for the plugin.... |